//
//  StatusView.m
//  Do Not Disturb
//
//  Created by Chris Karr on 11/13/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "StatusView.h"


@implementation StatusView

- (id)initWithFrame:(NSRect)frame 
{
    self = [super initWithFrame:frame];

    if (self) 
	{

    }
    return self;
}

- (void) drawRect:(NSRect) rect 
{
	rect = [[self superview] frame];

	[self setFrame:rect];
	
	float radius = 10.0;

	NSColor * backing = [NSColor colorWithCalibratedWhite:0.1 alpha:0.8];
	
	[backing setFill];

	NSBezierPath * path = [NSBezierPath bezierPath];
	[path setLineWidth:0.0];
	
	rect = NSInsetRect(rect, radius, radius);
	[path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(rect), NSMinY(rect)) radius:radius startAngle:180.0 endAngle:270.0];
	[path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(rect), NSMinY(rect)) radius:radius startAngle:270.0 endAngle:360.0];
	[path appendBezierPathWithArcWithCenter:NSMakePoint(NSMaxX(rect), NSMaxY(rect)) radius:radius startAngle:  0.0 endAngle: 90.0];
	[path appendBezierPathWithArcWithCenter:NSMakePoint(NSMinX(rect), NSMaxY(rect)) radius:radius startAngle: 90.0 endAngle:180.0];
	[path closePath];
	
	[path fill];
}


@end
